package ua.com.cms.entities;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import org.bson.types.ObjectId;

import java.util.ArrayList;
import java.util.List;

@Entity(noClassnameStored = true)
public class Page {
    @Id
    private ObjectId id;

    private String name;
    private List<ObjectId> templates;

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<ObjectId> getTemplates() {
        return templates==null?(new ArrayList<ObjectId>()):(templates);
    }

    public void setTemplates(List<ObjectId> templates) {
        this.templates = templates;
    }
}
